import request from '@/utils/request'

export function addPublicityPictures(publicityPictures) {
  return request({
    url: '/PublicityPictures/',
    method: 'post',
    data: {
      publicityPicturesGroup: publicityPictures.publicityPicturesGroup,
      publicityPicturesOrder: publicityPictures.publicityPicturesOrder,
      publicityPicturesPic: publicityPictures.publicityPicturesPic
    }
  })
}

export function updatePublicityPictures(publicityPictures) {
  return request({
    url: '/PublicityPictures/one',
    method: 'put',
    params: {
      publicityPicturesId: publicityPictures.publicityPicturesId,
      publicityPicturesGroup: publicityPictures.publicityPicturesGroup,
      publicityPicturesOrder: publicityPictures.publicityPicturesOrder,
      publicityPicturesPic: publicityPictures.publicityPicturesPic
    }
  })
}

export function getAllPublicityPictures() {
  return request({
    url: '/PublicityPictures/all',
    method: 'get'
  })
}

export function getPublicityPicturesById(id) {
  return request({
    url: '/PublicityPictures/one',
    method: 'get',
    params: {
      id: id
    }
  })
}

export function deletePublicityPicturesById(id) {
  return request({
    url: '/PublicityPictures/',
    method: 'delete',
    params: {
      id: id
    }
  })
}
